import type {
  CollectionAuthBaseInterface,
  CollectionAuthTypeBaseEnum,
  CollectionRequestAddToBaseEnum,
} from "./collection-base";
import type { HttpRequestAuthTypeBaseEnum } from "./http-request-base";

export enum RequestMethodEnum {
  GET = "GET",
  POST = "POST",
  PUT = "PUT",
  DELETE = "DELETE",
  PATCH = "PATCH",
  HEAD = "HEAD",
  OPTIONS = "OPTIONS",
}
export enum RequestDataTypeEnum {
  JSON = "JSON",
  XML = "XML",
  HTML = "HTML",
  TEXT = "Text",
  JAVASCRIPT = "JavaScript",
  IMAGE = "Image",
}
export enum RequestSectionEnum {
  PARAMETERS = "Parameters",
  AUTHORIZATION = "Authorization",
  HEADERS = "Headers",
  REQUEST_BODY = "Request Body",
  DOCUMENTATION = "Description",
  TESTS = "Tests",
  ASSERTIONS = "Assertions",
}

export enum MessageTypeEnum {
  SENDER = "Sender",
  RECEIVER = "Receiver",
}

export enum ResponseFormatterEnum {
  PRETTY = "Pretty",
  RAW = "Raw",
  PREVIEW = "Preview",
  VISUALIZE = "Visualize",
}
export enum ResponseSectionEnum {
  RESPONSE = "Response",
  HEADERS = "Headers",
  TESTRESULT = "TESTRESULT",
}

export enum RequestDatasetEnum {
  FORMDATA = "Form Data",
  URLENCODED = "URL Encoded",
  RAW = "Raw",
  BINARY = "Binary",
  NONE = "None",
}

export enum FormDataTypeEnum {
  TEXT = "text",
  FILE = "file",
}

export enum TestCaseModeEnum {
  NO_CODE = "no-code",
  SCRIPT = "script",
}

export enum TestCaseConditionOperatorEnum {
  EQUALS = "Equals",
  NOT_EQUAL = "Is Not Equal",
  EXISTS = "Exists",
  DOES_NOT_EXIST = "Does Not Exist",
  LESS_THAN = "Less Than",
  GREATER_THAN = "Greater Than",
  CONTAINS = "Contains",
  DOES_NOT_CONTAIN = "Does Not Contain",
  IS_EMPTY = "Is Empty",
  IS_NOT_EMPTY = "Is Not Empty",
  IN_LIST = "In List",
  NOT_IN_LIST = "Not In List",
  LESS_THAN_OR_EQUAL = "Less Than OR Equal",
  GREATER_THAN_OR_EQUAL = "Greater Than OR Equal",
}

export enum TestCaseSelectionTypeEnum {
  RESPONSE_TEXT = "Response Text",
  RESPONSE_JSON = "Response JSON",
  RESPONSE_HEADER = "Response Header",
  RESPONSE_XML = "Response XML",
  TIME_CONSUMING = "Time Consuming",
}

export enum UntrackedItemsEnum {
  UNTRACKED = "UNTRACKED-",
}

export interface KeyWrapper {
  key: string;
}
export interface ValueWrapper {
  value: string;
}
export interface CheckedWrapper {
  checked: boolean;
}
export interface BaseWrapper {
  base: string;
}
export interface RawWrapper {
  raw: string;
}
export interface TypeWrapper2 {
  type: FormDataTypeEnum;
}
export interface RequestBodyLanguageWrapper {
  requestBodyLanguage: RequestDataTypeEnum;
}
export interface RequestBodyNavigationWrapper {
  requestBodyNavigation: RequestDatasetEnum;
}
export interface RequestAuthNavigationWrapper {
  requestAuthNavigation: HttpRequestAuthTypeBaseEnum;
}
export interface RequestNavigationWrapper {
  requestNavigation: RequestSectionEnum;
}

export interface RequestAuthProfileNavigationWrapper {
  selectedRequestAuthProfileId: string;
}

export interface ResponseNavigationWrapper {
  responseNavigation: ResponseSectionEnum;
}
export interface ResponseBodyLanguageWrapper {
  responseBodyLanguage: RequestDataTypeEnum;
}
export interface ResponseBodyFormatterWrapper {
  responseBodyFormatter: ResponseFormatterEnum;
}
export interface RequestExtensionNavigationWrapper {
  requestExtensionNavigation: string;
}
export interface IsExposeEditDescriptionWrapper {
  isExposeEditDescription: boolean;
}
export interface RequestLeftSplitterWidthPercentageWrapper {
  requestLeftSplitterWidthPercentage: number;
}
export interface RequestRightSplitterWidthPercentageWrapper {
  requestRightSplitterWidthPercentage: number;
}
export interface IsSendRequestInProgressWrapper {
  isSendRequestInProgress: boolean;
}
export interface IsSaveDescriptionInProgressWrapper {
  isSaveDescriptionInProgress: boolean;
}
export interface IsSaveRequestInProgressWrapper {
  isSaveRequestInProgress: boolean;
}
export interface IsBulkHeaderWrapper {
  isHeaderBulkEditActive: boolean;
}
export interface IsChatbotActive {
  isChatbotActive: boolean;
}
export interface IsChatbotSuggestionsActive {
  isChatbotSuggestionsActive: boolean;
}
export interface IsBulkParameterWrapper {
  isParameterBulkEditActive: boolean;
}
export interface IsChatbotGeneratingResponse {
  isChatbotGeneratingResponse: boolean;
}

export interface IsDocGenerating {
  isDocGenerating: boolean;
}
export interface IsDocAlreadyGenerated {
  isDocAlreadyGenerated: boolean;
}

export interface UsernameWrapper {
  username: string;
}
export interface PasswordWrapper {
  password: string;
}
export interface AuthKeyWrapper {
  authKey: string;
}
export interface AuthValueWrapper {
  authValue: string;
}
export interface AddtoWrapper {
  addTo: CollectionRequestAddToBaseEnum;
}
export interface BearerTokenWrapper {
  bearerToken: string;
}
export interface MethodWrapper {
  method: RequestMethodEnum;
}
export interface UrlWrapper {
  url: string;
}
export interface ResponseHeadersWrapper {
  headers: KeyValueChecked[];
}

export interface ResponseStatusWrapper {
  status: string;
}
export interface ResponseBodyWrapper {
  body: string;
}
export interface ResponseTimeWrapper {
  time: number;
}
export interface ResponseSizeWrapper {
  size: number;
}
export interface isGeneratedVariable {
  isGeneratedVariable: boolean;
}
export interface isRequestTestsNoCodeDemoCompleted {
  isRequestTestsNoCodeDemoCompleted: boolean;
}
export interface isRequestTestsScriptDemoCompleted {
  isRequestTestsScriptDemoCompleted: boolean;
}

export interface isRequestAssertionsDemoCompleted {
  isRequestAssertionsDemoCompleted: boolean;
}

export interface Response
  extends ResponseStatusWrapper,
    ResponseHeadersWrapper,
    ResponseBodyWrapper,
    ResponseTimeWrapper,
    ResponseSizeWrapper {}

export interface ResponseWrapper {
  response: Response;
}

export interface KeyValue extends KeyWrapper, ValueWrapper {}
export interface KeyValueChecked
  extends KeyWrapper,
    ValueWrapper,
    CheckedWrapper {}
export interface KeyValueCheckedWithBase
  extends KeyWrapper,
    ValueWrapper,
    CheckedWrapper,
    BaseWrapper {}

export interface UrlEncodedWrapper {
  urlencoded: KeyValueChecked[];
}

export interface TextWrapper {
  text: KeyValueChecked[];
}
export interface FileWrapper {
  file: KeyValueCheckedWithBase[];
}
export interface FormData
  extends KeyWrapper,
    ValueWrapper,
    BaseWrapper,
    CheckedWrapper,
    TypeWrapper2 {}
export interface FormDataWrapper {
  formdata: FormData[];
}
export interface Body extends RawWrapper, UrlEncodedWrapper, FormDataWrapper {}

export interface BodyWrapper {
  body: Body;
}

export interface HttpRequestCollectionAuthTabInterface {
  auth: CollectionAuthBaseInterface;
}

export interface HttpRequestCollectionAuthNavigationTabInterface {
  collectionAuthNavigation: CollectionAuthTypeBaseEnum;
}

export interface HttpRequestCollectionLevelAuthTabInterface
  extends HttpRequestCollectionAuthTabInterface,
    HttpRequestCollectionAuthNavigationTabInterface {}

export interface HttpRequestCollectionLevelAuthProfileTabInterface
  extends HttpRequestCollectionAuthProfileTabInterface,
    HttpRequestSlectedAuthTypeInProfileInterface,
    HttpRequestCollectionAuthProfileIdInterface {}
export interface HttpRequestCollectionAuthProfileTabInterface {
  auth: CollectionAuthBaseInterface;
}
export interface HttpRequestSlectedAuthTypeInProfileInterface {
  authType: CollectionAuthTypeBaseEnum;
}
export interface HttpRequestCollectionAuthProfileIdInterface {
  authId: string;
}

export interface State
  extends RequestBodyLanguageWrapper,
    RequestBodyNavigationWrapper,
    RequestNavigationWrapper,
    RequestAuthNavigationWrapper,
    ResponseNavigationWrapper,
    ResponseBodyLanguageWrapper,
    ResponseBodyFormatterWrapper,
    RequestExtensionNavigationWrapper,
    IsExposeEditDescriptionWrapper,
    RequestLeftSplitterWidthPercentageWrapper,
    RequestRightSplitterWidthPercentageWrapper,
    IsSendRequestInProgressWrapper,
    IsSaveDescriptionInProgressWrapper,
    IsSaveRequestInProgressWrapper,
    IsBulkParameterWrapper,
    IsBulkHeaderWrapper,
    IsChatbotActive,
    IsChatbotSuggestionsActive,
    IsDocGenerating,
    IsDocAlreadyGenerated,
    IsChatbotGeneratingResponse,
    RequestAuthProfileNavigationWrapper {}

export interface StatePartial
  extends Partial<RequestBodyLanguageWrapper>,
    Partial<RequestBodyNavigationWrapper>,
    Partial<RequestNavigationWrapper>,
    Partial<RequestAuthNavigationWrapper>,
    Partial<ResponseNavigationWrapper>,
    Partial<ResponseBodyLanguageWrapper>,
    Partial<ResponseBodyFormatterWrapper>,
    Partial<RequestExtensionNavigationWrapper>,
    Partial<IsExposeEditDescriptionWrapper>,
    Partial<RequestLeftSplitterWidthPercentageWrapper>,
    Partial<RequestRightSplitterWidthPercentageWrapper>,
    Partial<IsSendRequestInProgressWrapper>,
    Partial<IsSaveDescriptionInProgressWrapper>,
    Partial<IsSaveRequestInProgressWrapper>,
    Partial<IsBulkParameterWrapper>,
    Partial<IsBulkHeaderWrapper>,
    Partial<IsChatbotActive>,
    Partial<IsChatbotSuggestionsActive>,
    Partial<IsChatbotGeneratingResponse>,
    Partial<IsDocAlreadyGenerated>,
    Partial<IsDocGenerating>,
    Partial<RequestAuthProfileNavigationWrapper> {}

export interface StateWrapper {
  state: State;
}

export interface PromptWrapper {
  prompt: string;
}

export interface TypeWrapper3 {
  type: MessageTypeEnum;
}
export interface MessageIdWrapper {
  messageId: string;
}
export interface MessageWrapper {
  message: string;
}
export interface IsLikedWrapper {
  isLiked: boolean;
}
export interface IsDislikedWrapper {
  isDisliked: boolean;
}
export interface StatusWrapper2 {
  status: boolean;
}

export interface Conversation
  extends TypeWrapper3,
    MessageIdWrapper,
    MessageWrapper,
    IsLikedWrapper,
    IsDislikedWrapper,
    StatusWrapper2 {}
export interface ConversationsWrapper {
  conversations: Conversation[];
}
export interface ThreadIdWrapper {
  threadId: string;
}
export interface AIModelNameWrapper {
  aiModelName: string;
}

export interface Ai
  extends PromptWrapper,
    ConversationsWrapper,
    ThreadIdWrapper,
    AIModelNameWrapper {}
export interface AiWrapper {
  ai: Ai;
}

export interface BasicAuth extends UsernameWrapper, PasswordWrapper {}
export interface BasicAuthWrapper {
  basicAuth: BasicAuth;
}
export interface ApiKey
  extends AuthKeyWrapper,
    AuthValueWrapper,
    AddtoWrapper {}
export interface ApiKeyWrapper {
  apiKey: ApiKey;
}
export interface Auth
  extends BearerTokenWrapper,
    BasicAuthWrapper,
    ApiKeyWrapper {}
export interface AuthWrapper {
  auth: Auth;
}
export interface Tests {
  testCaseMode: TestCaseModeEnum;
  noCode: {
    id: string;
    name: string;
    condition: TestCaseConditionOperatorEnum | "";
    expectedResult: string;
    testPath: string;
    testTarget: TestCaseSelectionTypeEnum | "";
  }[];
  script: string;
  preScript: string;
}

export interface TestsWrapper {
  tests: Tests;
}

export interface HeadersWrapper {
  headers: KeyValueChecked[];
}
export interface UrlEncoded extends KeyValueChecked {}
export interface Headers extends KeyValueChecked {}
export interface QueryParams extends KeyValueChecked {}
export interface AutoGeneratedHeaders extends KeyValueChecked {}

export interface QueryParamsWrapper {
  queryParams: KeyValueChecked[];
}
export interface AutoGeneratedHeadersWrapper {
  autoGeneratedHeaders: KeyValueChecked[];
}

export interface RequestWrapper {
  request: Request;
}
export interface Request
  extends MethodWrapper,
    BodyWrapper,
    QueryParamsWrapper,
    AutoGeneratedHeadersWrapper,
    StateWrapper,
    ResponseWrapper,
    AuthWrapper,
    TestsWrapper,
    UrlWrapper,
    AiWrapper,
    isGeneratedVariable,
    isRequestTestsNoCodeDemoCompleted,
    isRequestTestsScriptDemoCompleted,
    isRequestAssertionsDemoCompleted,
    HeadersWrapper {}
